﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:uc="clr-namespace:FileExplorer.WPF.UserControls"
    xmlns:bc="clr-namespace:FileExplorer.WPF.BaseControls"
    >
    <ResourceDictionary.MergedDictionaries>

        <ResourceDictionary Source="pack://application:,,,/FileExplorer3.WPF;component/Themes/Common/Buttons.xaml" />
    </ResourceDictionary.MergedDictionaries>



    <ControlTemplate x:Key="RadioComboBoxItemTemplate" TargetType="ComboBoxItem">
        <RadioButton Background="White" Template="{StaticResource BaseToggleButton}"
                      IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" >
            <RadioButton.Content>
                    <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
                                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </RadioButton.Content>

        </RadioButton>        
    </ControlTemplate>

    <Style x:Key="RadioComboBoxItemStyle" TargetType="ComboBoxItem">
        <Setter Property="Template" Value="{StaticResource RadioComboBoxItemTemplate}" />
    </Style>

    <Style x:Key="RadioCombo" TargetType="ComboBox">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBox" >
                    <ItemsPresenter />
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Setter Property="ItemsPanel" >
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" IsItemsHost="True" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>

        <Setter Property="ItemContainerStyle" Value="{StaticResource RadioComboBoxItemStyle}" />
    </Style>

</ResourceDictionary>